Interview Questions and Answer
Options:
a. sys.trigger
b. sys.triggers
c. sys.viewtriggers
d. None
Reveal Answer
Options:
a. After
b. For
c. Instead of
d. Before
Reveal Answer
Options:
a. sp_triggersetorder
b. sp_settriggerorder
c. sp_triggerorder
d. sp_triggerorderset
Reveal Answer
Options:
a. The code in the trigger is executed first and after that the insert statement is executed and the record is inserted into the table.
b. The record is inserted into the database first and after that the trigger is fired and the code in the trigger is executed.
c. The record is not inserted into the database at all, instead the code in the trigger is executed
d. The insert statement is performed and the record is inserted in to the database, but the code in the trigger is not executed at allocated
Reveal Answer
Options:
a. Instead of trigger
b. After triggers
c. For triggers
d. None of the above are similar
Reveal Answer
Options:
a. Delete table
b. Deleted table
c. Insert table
d. Inserted table
Reveal Answer
Options:
a. Magic tables have to be created by the user explicitly while creating trigger itself
b. The span of magic tables is until the table on which they are created exists
c. The sql server creates the magic tables
d. The span of magic tables is until the execution of the trigger is completed.
Reveal Answer
Options:
a. Insert
b. Delete
c. Update
d. All the above
Reveal Answer
Options:
a. Does not accept arguments or parameters
b. can perform COMMIT and ROLLBACK in the trigger code
c. cyclic triggers should be avoided
d. Magic tables contain the new and old values of the data that initiated the trigger
Reveal Answer
Options:
a. The error message 'INVALIED DEPARTMENT NUMBER' will be displayed as the department doesnot exist, but still the record is inserted
b. The error message 'INVALIED DEPARTMENT NUMBER' will be displayed as the department doesnot exist, and the record is not inserted as the total transaction is rolled back
c. ROLLBACK is not a valid statement in triggers.
d. ROLLBACK will rollback all the executable statements above and also the insert action which fired the trigger
Reveal Answer
Options:
a. Though there is a data modification logic within a trigger for which there is a trigger created, the trigger can not be fired from within a trigger
b. If there is a data modification logic within a trigger for which there is a trigger created, then the trigger can be fired from within a trigger
c. A trigger that contains data modification logic within itself is called a nested trigger.
d. Nested triggers are not allowed
Reveal Answer
Bestdotnet google plus